package com.example.designPatten.command.simpleRemote;

/**
 * @Title: []
 * @Description:
 * @Date : 2016年5月3日上午10:28:09
 * @Company: SI-TECH
 * @author : LIJXD
 * @version : 1.0
 * @modify history
 *         <p>
 *         修改日期 修改人 修改目的
 *         <p>
 */
public class RemoteControlTest {
	public static void main(String[] args) {
		SimpleRemoteControl remote = new SimpleRemoteControl();
		Light light = new Light();
		LightOnCommand lightCmd = new LightOnCommand(light);

		GarageDoor garageDoor = new GarageDoor();
		GarageDoorOpenCommand garageOpen = new GarageDoorOpenCommand(garageDoor);
		
		remote.setCommand(lightCmd);
		remote.buttonWasPressed();
		
		remote.setCommand(garageOpen);
		remote.buttonWasPressed();
	}
}
